import 'package:flutter_shop/pages/cart/order_confirm/entity/order_confirm_form_data.dart';
import 'package:flutter_shop/pages/cart/cart_cons.dart';

orderConfirmFormDataFromJson(OrderConfirmFormData data, Map<String, dynamic> json) {
	if (json['name'] != null) {
		data.name = json['name']?.toString();
	}
	if (json['phone'] != null) {
		data.phone = json['phone']?.toString();
	}
	if (json['address'] != null) {
		data.address = json['address']?.toString();
	}
	if (json['reserveTime'] != null) {
		data.reserveTime = json['reserveTime']?.toString();
	}
	if (json['payWay'] != null) {
		data.payWay = json['payWay']?.toString();
	}
	return data;
}

Map<String, dynamic> orderConfirmFormDataToJson(OrderConfirmFormData entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['name'] = entity.name;
	data['phone'] = entity.phone;
	data['address'] = entity.address;
	data['reserveTime'] = entity.reserveTime;
	data['payWay'] = entity.payWay;
	return data;
}